<!DOCTYPE html>
<!--suppress ALL -->
<html lang="en" xmlns:th="http://www.thymeleaf.org"
    xmlns:shiro="http://www.thymeleaf.org/thymeleaf-extras-shiro">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
    <div th:if="${session.loginFlag==null}">
        <a th:href="@{/toLogin}">登录</a>
    </div>
    <div th:if="${session.loginFlag!=null}">
        <a th:href="@{/logout}">退出登录</a>
    </div>
    <div shiro:hasPermission="user:add"><!-- 只有有权限时才显示 -->
        <a th:href="@{/user/toAdd}">ADD</a><br/>
    </div>
    <div shiro:hasPermission="user:delete"><!-- 只有有权限时才显示 -->
        <a th:href="@{/user/toDelete}">DELETE</a>
    </div>
</body>
</html>